<template>
	<view>
		<!-- <view class="joinGroup" @click="show=true">点我进群</view> -->
		<image :src="systemData.qun_image" class="joinGroup" @click="show=true"  mode="widthFix"></image>
		<u-popup :show="show"  mode="center" bgColor="transparent">
			<view class="content">
				<image :src="systemData.qun_alert_image" mode="widthFix" class="poster" :show-menu-by-longpress="true"></image>
				<!-- // <view class="tip" @click="handleDownImg">下载二维码</view> -->
				<image src="../../static/close.png" class="close" @click="show=false"></image>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false
			}
		},
		computed: {
			systemData() {
				return this.$store.state.systemData
			}
		},
		methods:{
			handleDownImg(){
				let imagePath =this.systemData.wechat_image;
				 uni.getImageInfo({
				             src: imagePath,
				             success: function (res) {
				               var path=res.path;
				               uni.saveImageToPhotosAlbum({
				                 filePath: path,
				                 success(res) {
				                   uni.showToast({
				                     title: '保存成功',
				                     icon: "none"
				                   })
				                   console.log(res);
				                 },
				                 fail(res) {
				                   uni.showToast({
				                     title: '保存失败',
				                     icon: "none"
				                   })
				                   console.log(res);
				                 }
				               })
				             },
							 fail(res) {
							  
							   console.log(res);
							 }
				           })
			
			
			}
		}
	}
</script>

<style scoped lang="scss">
	.joinGroup {
		position: fixed;
		right: 10rpx;
		bottom: 10rpx;
		width: 77rpx;
		
	}
	.content{
		position: relative;
		.close{
			position: absolute;
			width:50rpx;
			height: 50rpx;
			right: -50rpx;
			top: -50rpx;
		}
		
		.poster{
			width: 600rpx;
			
		}
		.tip{
			text-align: center;
			margin: 60rpx auto 0 auto;
			width: 450rpx;
			height: 85rpx;
			background: linear-gradient(to right, #eec25b, #f7e7ad);
			border-radius: 40rpx;
			color: #fff;
			font-size: 32rpx;
			letter-spacing: 4rpx;
			font-weight: 800;
			line-height: 85rpx;
		}
	}
</style>